﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace KnowledgeKiosk
{
	public partial class InBrowserPage : UserControl
	{
		public InBrowserPage()
		{
			// Required to initialize variables
			InitializeComponent();

		    panelNotInstalled.Visibility = (App.Current.InstallState == InstallState.NotInstalled)
		                                       ? Visibility.Visible
		                                       : Visibility.Collapsed;
		    panelInstalled.Visibility = (App.Current.InstallState == InstallState.Installed)
		                                    ? Visibility.Visible
		                                    : Visibility.Collapsed;

		}

		private void buttonInstall_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            if (Application.Current.InstallState == InstallState.NotInstalled)
            {
                Application.Current.Install();
            }
		}
	}
}